<?php
$strTableName="proforma_invoices_report";
$_SESSION["OwnerID"] = $_SESSION["_".$strTableName."_OwnerID"];

$strOriginalTableName="proforma_invoices";

$gstrOrderBy="";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy="order by ".$gstrOrderBy;

$g_orderindexes=array();
$gsqlHead="SELECT proforma_invoices.account_id,  proforma_invoices.buyer_id,  proforma_invoices.consignee_id,  proforma_invoices.notify_id,  proforma_invoice_items.part_no,  proforma_invoice_items.uom_id,  proforma_invoice_items.quantity,  proforma_invoice_items.description,  proforma_invoice_items.unit_price,  proforma_invoice_items.total_price,  proforma_invoices.proforma_invoice_no,  proforma_invoices.proforma_invoice_date";
$gsqlFrom="FROM proforma_invoices  INNER JOIN proforma_invoice_items ON proforma_invoices.id = proforma_invoice_items.proforma_commercial_id";
$gsqlWhereExpr="";
$gsqlTail="";

include(getabspath("include/proforma_invoices_report_settings.php"));

// alias for 'SQLQuery' object
$gQuery = &$queryData_proforma_invoices_report;
$eventObj = &$tableEvents["proforma_invoices_report"];

$reportCaseSensitiveGroupFields = false;

$gstrSQL = gSQLWhere("");


?>